<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head><title>用户列表页</title>
    <script  src="../js/jquery-2.1.4.js"></script>
  
     <link rel="stylesheet" href="../css/lanrenzhijia.css" media="all">
           <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
   <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script>
jQuery(document).ready(function($) {
	$('.theme-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
	});
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	});
    
});
$(document).ready(function(){
	$('.user3').click(function(){
		$('#sysid').attr("value",$(this).attr('id'));
		$('#lenusername1').attr("value",$('#lenusername').text());
		$('#lenpassword1').attr("value",$('#lenpassword').text());
		$('#upfiletyle1').attr("value",$('#upfiletyle').text());
		$('#upfilesize1').attr("value",$('#upfilesize').text());
		$('#loginstyle1').attr("value",$('#loginstyle').text());
		$('#reviewtf1').attr("value",$('#reviewtf').text());
		$('#register1').attr("value",$('#register').text());
	});
});
</script>
</head>
<body >
<div style="padding-left: 15px;height:auto;width:99%;" >
<h1>参数设置</h1><hr>
    <div  >
<form action="" method="post" >
<table class="table table-bordered">
   <thead>
      <tr>
         <th>用户名长度</th>
         <th>密码长度</th>
         <th>上传文件类型</th>
         <th>上传文件大小</th>
         <th>登录样式</th>
         <th>是否允许评论</th>
         <th>是否允许注册</th>
         <th>修改</th>
      </tr>
   </thead>    
         <tbody> 
      <% ResultSet rs=null;
        Statement statement=null;
        try{
        Driver driver=new com.mysql.jdbc.Driver();
        DriverManager.registerDriver(driver);
         Connection connection=DriverManager.getConnection("jdbc:mysql://www.ccjjltx.cn:3307/numbersystem?useUnicode=true&characterEncoding=utf8","root","usbw");
         String sql="select * from  sys_par";  //创建执行语句
         statement=connection.createStatement();
         rs=statement.executeQuery(sql);
         while(rs.next())
        { 
        %>
                <tr>
                <td id="lenusername"><%=rs.getString("lenusername")%></td>
                <td id="lenpassword"><%=rs.getString("lenpassword")%></td>
                <td id="upfiletyle"><%=rs.getString("upfiletyle")%></td>
                <td id="upfilesize"><%=rs.getString("upfilesize")%></td>
                <td id="loginstyle"><%=rs.getInt("loginstyle")%></td>
                <td id="reviewtf"><%=rs.getInt("reviewtf")%></td>
                <td id="register"><%=rs.getInt("register")%></td>
                <td> <a style="background-color:fff;border:0" class="btn btn-primary btn-large theme-login" id="edit" name="<%=rs.getInt("sysid")%>" href="javascript:;%>"><input type="button" style="background-color:fff;border:0" class="user3" id="<%=rs.getInt("sysid")%>" value="编辑"></a></td>
            </tr>
        <% } 
        }catch(Exception e){
        e.printStackTrace();
        }
        %>
           </tbody>
    </table>
</form>
        </div>
    </div>
<div class="theme-popover">
     <div class="theme-poptit">
          <a href="javascript:;" title="关闭" class="close">×</a>
          <h3></h3>
     </div>
     <div class="theme-popbod dform" >
           <form class="theme-signin" name="loginform" action="attr_update_do.jsp" method="post">
                <ol>
                     <li><strong style="width:130px">用户名长度：</strong><input class="ipt" type="text" name="lenusername" id="lenusername1" value="" size="20" /></li>
                     <li><strong style="width:130px">密码长度：</strong><input class="ipt" type="text" name="lenpassword" id="lenpassword1" value="" size="20" /></li>
                     <li><strong style="width:130px">上传文件类型：</strong><input class="ipt" type="text" name="upfiletyle"  id="upfiletyle1" value="" size="20" /></li>
                     <li><strong style="width:130px">上传文件大小：</strong><input class="ipt" type="text" name="upfilesize" id="upfilesize1" value="" size="20" /></li>
                     <li><strong style="width:130px">登录样式：</strong><input class="ipt" type="text" name="loginstyle" id="loginstyle1" value="" size="20" /></li>
                     <li><strong style="width:130px">是否允许评论：</strong><input class="ipt" type="text" name="reviewtf" id="reviewtf1" value="" size="20" /></li>
                      <li><strong style="width:130px">是否允许注册：</strong><input class="ipt" type="text" name="register" id="register1" value="" size="20" /></li>
                     <li><input class="ipt" type="hidden" id="sysid" name="sysid"   /></li>
                     <li><input class="btn btn-primary" style="width:250px;height:40px" type="submit" name="submit" value=" 修改 " /></li>
                </ol>
           </form>
     </div>
</div>

</body>
</html>

